package org.yanghaokun.org.domain;

import lombok.Data;
import org.yanghaokun.basic.domain.BaseDomain;

import java.util.ArrayList;
import java.util.List;

@Data
public class Department extends BaseDomain {
    private String sn;
    private String name;
    private String dirPath;
    private Integer state;
    /*部门经理 和员工关联*/
    private Employee manager;
    private Long parent_id;
    /*上级部门*/
    private Department parent;

//    我们为了在后面找出部门树一级级查找，所以我们选择在这里放入子部门查询，把查询到的所有子部门信息关联起来
    private List<Department> children = new ArrayList<>();

}
